<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"> 

<head></head> 
<body> 

	<ui:composition template="../WEB-INF/layout/template.xhtml">
		<ui:define name="title"><h:outputText value="#{msg.changes_saved}"/></ui:define>
		<ui:define name="content">
			
			<div style="width:750px;margin:auto;">
				<h:form id="insertForum">
					<p:panel id="panel">				
						<fieldset id="field">
							<legend><h:outputText value="#{msg.student_details}"/></legend>
								
								<p:panel id="generalitiesPanel">
									<fieldset id="generalitiesFieldSet">
										<legend>#{msg.generalities}</legend>
										<h:panelGrid columns="3">
											<h:outputText value="#{msg.name} *: "/>
											<h:outputText id="nome" value="#{inserisciStudenteBean.studentOutput.firstName}" required="true">
	
											</h:outputText>
											<p:message for="nome" style="color:red;"/>
						
											<h:outputText value="#{msg.surname} *: "/>
											<h:outputText id="cognome" value="#{inserisciStudenteBean.studentOutput.surname}" required="true">
											
											</h:outputText>
											<p:message for="cognome" style="color:red;"/>
							
											<h:outputText value="#{msg.birth_date}: "/>
											<h:outputText id="dataNascita" value="#{inserisciStudenteBean.studentOutput.dataNascita}"/>
											<p:message for="dataNascita" style="color:red;"/>
								
											<h:outputText value="#{msg.codice_fiscale}: "/>
											<h:outputText id="codiceFiscale" value="#{inserisciStudenteBean.studentOutput.codiceFiscale}" >
											
											</h:outputText>
											<p:message for="codiceFiscale" style="color:red;"/>
										</h:panelGrid>
									</fieldset>
								</p:panel>
						
								<p:panel id="emailsPanel">
									<fieldset id="emailsFieldSet">
										<legend>#{msg.emails}</legend>
										<h:dataTable value="#{inserisciStudenteBean.studentOutput.emails}" var="email">
											<h:column>
												<h:outputText value="#{msg.email}: "/>
											</h:column>
											<h:column>
												<h:outputText id="email" value="#{email.email}">
												
												
												</h:outputText>
											</h:column>
											<h:column>
												<h:outputText value="#{email.type}"/>
											</h:column>
											<h:column>
												<p:message for="email" style="color:red;"/>
											</h:column>
										</h:dataTable>
									
									</fieldset>
								</p:panel>
						
								<p:panel id="phonesPanel">
									<fieldset id="phonesFieldSet">
										<legend>#{msg.phones}</legend>
										<h:dataTable value="#{inserisciStudenteBean.studentOutput.telephones}" var="telephone">
											<h:column>
												<h:outputText value="#{msg.number}: "/>
											</h:column>
											<h:column>
												<h:outputText id="number" value="#{telephone.number}">
													
												</h:outputText>
											</h:column>
											<h:column>
												<h:outputText value="#{telephone.type}"/>
											</h:column>
											<h:column>
												<h:outputText value="#{telephone.country}"/>
											</h:column>
											<h:column>
												<p:message for="number" style="color:red;"/>
											</h:column>
										</h:dataTable>
									</fieldset>
								</p:panel>
								
								<p:panel id="faxesPanel">
									<fieldset id="faxesFieldSet">
										<legend>#{msg.faxes}</legend>
										<h:dataTable value="#{inserisciStudenteBean.studentOutput.faxes}" var="fax">
											<h:column>
												<h:outputText value="#{msg.number}: "/>
											</h:column>
											<h:column>
												<h:outputText id="number" value="#{fax.number}">
													
												</h:outputText>
											</h:column>
											<h:column>
												<p:message for="number" style="color:red;"/>
											</h:column>
										</h:dataTable>
									</fieldset>
								</p:panel>
						
								<p:panel id="addressItPanel">
									<fieldset>
										<legend>#{msg.it_address}</legend>
										<h:panelGrid columns="3">
											<h:outputText value="#{msg.address_line_1}: "/>
											<h:outputText id="indirizzoLinea1It" value="#{inserisciStudenteBean.studentOutput.indirizzoIt.indirizzoLinea1}">
											</h:outputText>
											<p:message for="indirizzoLinea1It" style="color:red;"/>
						
											<h:outputText value="#{msg.address_line_2}: "/>
											<h:outputText id="indirizzoLinea2It" value="#{inserisciStudenteBean.studentOutput.indirizzoIt.indirizzoLinea2}">
											</h:outputText>
											<p:message for="indirizzoLinea2It" style="color:red;"/>
						
											<h:outputText value="#{msg.town}: "/>
											<h:outputText id="cittaIt" value="#{inserisciStudenteBean.studentOutput.indirizzoIt.citta}">
												
											</h:outputText>
											<p:message for="cittaIt" style="color:red;"/>
						
											<h:outputText value="#{msg.province}: "/>
											<h:outputText id="provincia" value="#{inserisciStudenteBean.studentOutput.indirizzoIt.provincia}">
												
				
											</h:outputText>
											<p:message for="provincia" style="color:red;"/>
							
											<h:outputText value="#{msg.cap}: "/>
											<h:outputText id="cap" value="#{inserisciStudenteBean.studentOutput.indirizzoIt.cap}">
														
											</h:outputText>
											<p:message for="cap" style="color:red;"/>
						
											<h:outputText value="#{msg.country}: "/>
											<h:outputText id="paeseIt" value="#{inserisciStudenteBean.studentOutput.indirizzoIt.paese}">
														
											</h:outputText>
											<p:message for="paeseIt" style="color:red;"/>
										</h:panelGrid>
									</fieldset>
								</p:panel>
								
								<p:panel id="addressAuPanel">
									<fieldset>
										<legend>#{msg.au_address}</legend>
										<h:panelGrid columns="3">
											<h:outputText value="#{msg.address_line_1}: "/>
											<h:outputText id="indirizzoLinea1Au" value="#{inserisciStudenteBean.studentOutput.indirizzoAu.indirizzoLinea1}">
											</h:outputText>
											<p:message for="indirizzoLinea1Au" style="color:red;"/>
						
											<h:outputText value="#{msg.address_line_2}: "/>
											<h:outputText id="indirizzoLinea2Au" value="#{inserisciStudenteBean.studentOutput.indirizzoAu.indirizzoLinea2}">
											</h:outputText>
											<p:message for="indirizzoLinea2Au" style="color:red;"/>
						
											<h:outputText value="#{msg.town}: "/>
											<h:outputText id="cittaAu" value="#{inserisciStudenteBean.studentOutput.indirizzoAu.citta}">
												
											</h:outputText>
											<p:message for="cittaAu" style="color:red;"/>
		
											<h:outputText value="#{msg.state}: "/>
											<h:outputText id="stato" value="#{inserisciStudenteBean.studentOutput.indirizzoAu.stato}">
													
											</h:outputText>
											<p:message for="stato" style="color:red;"/>
							
											<h:outputText value="#{msg.post_code}: "/>
											<h:outputText id="postCode" value="#{inserisciStudenteBean.studentOutput.indirizzoAu.postCode}">
												
											</h:outputText>
											<p:message for="postCode" style="color:red;"/>
						
											<h:outputText value="#{msg.country}: "/>
											<h:outputText id="paeseAu" value="#{inserisciStudenteBean.studentOutput.indirizzoAu.paese}">
													
											</h:outputText>
											<p:message for="paeseAu" style="color:red;"/>
										</h:panelGrid>
									</fieldset>
								</p:panel>
					
						</fieldset>				
					</p:panel>
				</h:form>
			</div>
			
			<h:form>
					<h:commandLink value="#{msg.add_student}" action="inserisciStudente"/>
			</h:form>
			
		</ui:define>
	</ui:composition>

</body> 
</html>
